package xyz.xiaomuyu.moment_read_app.activity;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import java.util.Calendar;

import xyz.xiaomuyu.moment_read_app.MyTabbar;
import xyz.xiaomuyu.moment_read_app.R;

public class Homeselect extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.homeselect);
        Calendar calendar = Calendar.getInstance();
        String month = "";
        switch(calendar.get(Calendar.MONTH)) {//1月是0
            case 0 : month = "Jan.";break;
            case 1 : month = "Feb.";break;
            case 2 : month = "Mar.";break;
            case 3 : month = "Apr.";break;
            case 4 : month = "May.";break;
            case 5 : month = "Jun.";break;
            case 6 : month = "Jul.";break;
            case 7 : month = "Aug.";break;
            case 8 : month = "Sept.";break;
            case 9 : month = "Oct.";break;
            case 10 : month = "Nov.";break;
            case 11 : month = "Dec.";break;
        }
        TextView calendartV1 = (TextView) findViewById(R.id.calendar1);
        String s1 = "";
        s1=calendar.get(Calendar.DAY_OF_MONTH)+" "+month+calendar.get(Calendar.YEAR)+"▲";
        calendartV1.setText(s1);
        calendartV1.setOnClickListener(new View.OnClickListener(){
            public void onClick(View view){
                Intent intent=new Intent(Homeselect.this, MyTabbar.class);
                startActivity(intent);
            }
        });

        LinearLayout linearLayout514 = (LinearLayout)findViewById(R.id.calendar514);
        linearLayout514.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Homeselect.this, MyTabbar.class);
                startActivity(intent);
            }
        });

        LinearLayout linearLayout516 = (LinearLayout)findViewById(R.id.calendar516);
        linearLayout516.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Homeselect.this,Home516.class);
                startActivity(intent);
            }
        });
    }
}